package com.csdj.questions.service;

import com.csdj.questions.entity.AttentionQuestion;
import com.csdj.questions.mapper.AttentionQuestionMapper;
import com.csdj.questions.service.IAttentionQuestionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 关注问题表（我关注的问题） 服务实现类
 * </p>
 *
 * @author 刘宇
 * @since 2022-03-07
 */
@Service
public class AttentionQuestionService extends ServiceImpl<AttentionQuestionMapper, AttentionQuestion> implements IAttentionQuestionService {
    @Resource
    private AttentionQuestionMapper attentionQuestionMapper;
    /**
     * 插入，存两个id一个用户id，一个问题id,用户id获取请求头的id
     * @return 受影响的行数
     */
    public int insertAttentionQuestion(AttentionQuestion attentionQuestion) {
        return attentionQuestionMapper.insert(attentionQuestion);
    }


}
